Bail out of window move/resize early if no change
authorAlexander Larsson <alexl@redhat.com>
Mon, 14 Sep 2009 11:09:07 +0000 (13:09 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 14 Sep 2009 11:52:40 +0000 (13:52 +0200)
This is not all that uncommon in size_allocate, so we want
to optimize this case.

gdk/gdkwindow.c

index 78911ae2341c4bf917c51c742f3caa6e00e30ee7..35600011dced632166bf51c412bb9d1558617a1f 100644 (file)
@@ -6990,6 +6990,14 @@ gdk_window_move_resize_internal (GdkWindow *window,
       return;
     }
 
+  /* Bail early if no change */
+  if (private->width == width &&
+      private->height == height &&
+      (!with_move ||
+       (private->x == x &&
+       private->y == y)))
+    return;
+
   /* Handle child windows */
 
   expose = FALSE;